TOKEN_PACKAGE

import com.element.radiance.common.api.icon.AbstractSvgIcon;
import com.element.radiance.common.api.icon.SvgIcon;
import com.element.radiance.common.api.icon.SvgIconUIResource;

import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.geom.*;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.util.Base64;

public class TOKEN_CLASSNAME extends AbstractSvgIcon {
	/**
	 * @see AbstractSvgIcon#AbstractSvgIcon()
	 */
	public TOKEN_CLASSNAME() {
		this.width = (int) getOrigWidth();
		this.height = (int) getOrigHeight();
	}

	TOKEN_RASTER_CODE

	TOKEN_PAINTING_CODE

	protected void innerPaint(Graphics2D g) {
		float origAlpha = getOrigAlpha(g);

		TOKEN_PAINTING_INVOCATIONS

		super.innerPaint(g);
	}

	/**
	 * @see AbstractSvgIcon#getOrigX()
	 */
	public static double getOrigX() {
		return TOKEN_ORIG_X;
	}

	/**
	 * @see AbstractSvgIcon#getOrigY()
	 */
	public static double getOrigY() {
		return TOKEN_ORIG_Y;
	}

	/**
	 * @see AbstractSvgIcon#getOrigWidth()
	 */
	public static double getOrigWidth() {
		return TOKEN_ORIG_WIDTH;
	}

	/**
	 * @see AbstractSvgIcon#getOrigHeight()
	 */
	public static double getOrigHeight() {
		return TOKEN_ORIG_HEIGHT;
	}

	@Override
	public boolean supportsColorFilter() {
		return TOKEN_SUPPORTS_COLOR_FILTER;
	}

	/**
	 * @see AbstractSvgIcon#of(int, int)
	 */
	public static SvgIcon of(int width, int height) {
		TOKEN_CLASSNAME base = new TOKEN_CLASSNAME();
		base.width = width;
		base.height = height;
		return base;
	}

	/**
	 * @see AbstractSvgIcon#uiResourceOf(int, int)
	 */
	public static SvgIconUIResource uiResourceOf(int width, int height) {
		TOKEN_CLASSNAME base = new TOKEN_CLASSNAME();
		base.width = width;
		base.height = height;
		return new SvgIconUIResource(base);
	}

	@Override
	public synchronized void paintIcon(Component c, Graphics g, int x, int y) {
		Graphics2D g2 = paint(c, g, x, y, getOrigWidth(), getOrigHeight(), getOrigX(), getOrigY());
		innerPaint(g2);
		g2.dispose();
	}

	/**
	 * @see AbstractSvgIcon#factory()
	 */
	public static Factory factory() {
		return TOKEN_CLASSNAME::new;
	}
}